<?php

namespace module\manage\validate\auth;

use app\Validate;
/*
 * 节点模型.
 *
 * @property integer $id
 */
class Node extends Validate
{
    /**
     * 验证场景需要的字段.
     *
     * @var array<array>
     */
    protected $scene = [
        'save' => ['code', 'name', 'memo']
    ];
    /*
     * @inheritdoc
     */
    public $rule = [
        'id' => 'require|integer|max:10',
		'code' => 'requireWithout:id|string', 
		'name' => 'requireWithout:id|string',
		'memo' => 'string|max:40'
    ];
    /*
     * @inheritdoc
     */
    public $field = [
        'id' => 'ID',
		'code' => '编码', 
		'name' => '名称',
		'memo' => '备注'
    ];
}
